<template>
  <div>
    <button @click='isPerson=!isPerson'>更换人物</button>
  <h1>该人物为：{{isPerson?'鞠婧祎':'赵露思'}}</h1>
  <img :src="url" width="400px">
  </div>
</template>

<script>
import j1 from './j1.webp';
import l3 from './l3.webp'
export default {
    name:'Person',
    data(){
        return{
            isPerson:true,
            url:j1
        }
    },
    watch:{
        isPerson:{
            handler(newValue){
               
                this.url=newValue?j1:l3
            }
        }
    }
}
</script>

<style>

</style>